<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>验证微博浏览器</title>
</head>
<body>


	<textarea name="" id="qwer" cols="30" rows="10" font-size='30px'></textarea>

	<script>
		window.onload=function() {
			// var ua = navigator.userAgent;
			qwer.value=whatBrow();
			isWX();
			// alert(ua);
			// _czc.push(﻿["_trackEvent",whatBrow(),'浏览器类型']);
		}


		function isWX() {
			var ua = navigator.userAgent.toLowerCase();  
		    if(ua.match(/MicroMessenger/i)=="micromessenger") {  
		        // return '微信';  
		        alert(123)
		    }
		}











		function whatBrow(){  
		    var ua = navigator.userAgent.toLowerCase();  
		    if(ua.match(/MicroMessenger/i)=="micromessenger") {  
		        return '微信';  
		    } else if(ua.match(/WeiBo/i) == "weibo") {  
		        return '微博';  
		    } else if(ua.match(/QQ/i) == "qq") {
		    	return 'qq';
		    }else {
		    	return '其它';
		    }
		}
	</script>
	<!-- <script src="https://s22.cnzz.com/z_stat.php?id=1264490351&web_id=1264490351" language="JavaScript"></script> -->
</body>
</html>